/*
 * DatabaseLocator.java
 *
 * Created on 18 de Novembro de 2006, 11:47
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package percistence;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DatabaseLocator {
  private static DatabaseLocator instance = new DatabaseLocator();
  public static DatabaseLocator getInstance() {
    return instance;
  }
  /** Creates a new instance of DatabaseLocator */
  private DatabaseLocator() {
  }
  public Connection getConnection() throws SQLException, ClassNotFoundException
  {
      Class.forName("com.mysql.jdbc.Driver");
      Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/academia", "root", "");
      return conn;
      
  }
}










